package com.kantboot.business.talent.web.controller;

import com.kantboot.business.talent.service.IBusTalentSkillLevelService;
import com.kantboot.global.rest.result.CommonSuccessStateCodeAndMsg;
import com.kantboot.util.common.result.RestResult;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/business-talent-web/skillLevel")
public class BusTalentSkillLevelController {

    @Resource
    private IBusTalentSkillLevelService service;

    /**
     * 获取所有技能等级
     * @return 所有技能等级
     */
    @RequestMapping("/getAll")
    public RestResult<Object> getAll() {
        return RestResult.success(service.getAll(), CommonSuccessStateCodeAndMsg.GET_SUCCESS);
    }

    /**
     * 获取所有技能等级及其条件
     * @return 所有技能等级及其条件
     */
    @RequestMapping("/getAllHasCondition")
    public RestResult<Object> getAllHasCondition() {
        return RestResult.success(service.getAllHasCondition(), CommonSuccessStateCodeAndMsg.GET_SUCCESS);
    }

}
